import App from './App'
import {
	myReq
} from './until/api.js'
// 引入全局uView
import uView from "uview-ui";
Vue.use(uView);

Vue.filter('formateDate', (date) => {
	const d = new Date(date)
	const y = d.getFullYear().toString().padStart(2, 0)
	const m = d.getMonth().toString().padStart(2, 0)
	const day = d.getDate().toString().padStart(2, 0)
	return y + "-" + m + "-" + day
})

Vue.filter('formateDate2', (date) => {
	const d = new Date(date)
	const m = (d.getMonth() + 1).toString().padStart(2, 0)
	const day = d.getDate().toString().padStart(2, 0)
	return m + "-" + day
})

Vue.prototype.$myReq = myReq
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
